call histadd("cmd","load ".expand('<sfile>:t:r')."...")
" Preamble {{{
" ==============================================================================
"        File: Haroogan.vim
" ------------------------------------------------------------------------------
"     Authors: Alexander Shukaev <AlexanderShukaev@gmail.com>
" ------------------------------------------------------------------------------
" Maintainers: Alexander Shukaev <AlexanderShukaev@gmail.com>
" ------------------------------------------------------------------------------
"  Copyrights: (C) 2013, Alexander Shukaev <AlexanderShukaev@gmail.com>
" ------------------------------------------------------------------------------
"     License: This program is free software: you can redistribute it and/or
"              modify it under the terms of the GNU General Public License as
"              published by the Free Software Foundation, either version 3 of
"              the License, or (at your option) any later version.
"
"              This program is distributed in the hope that it will be useful,
"              but WITHOUT ANY WARRANTY; without even the implied warranty of
"              MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
"              General Public License for more details.
"
"              You should have received a copy of the GNU General Public License
"              along with this program. If not, see
"              <http://www.gnu.org/licenses/>.
" ==============================================================================
" }}} Preamble

" Functions {{{
" ==============================================================================
" Public {{{
" ==============================================================================
function! Haroogan#Quote(string)
  return "'" . a:string . "'"
endfunction

function! Haroogan#CreateDir(path, permissions)
  let l:path = simplify(expand(a:path, 1))

  if !isdirectory(l:path)
    if exists('*mkdir')
      call mkdir(l:path, 'p', a:permissions)
    endif
  endif
endfunction

function! Haroogan#GetUserName()
  return expand('$USERNAME', 1)
endfunction

function! Haroogan#GetHostName()
  return hostname()
endfunction

function! Haroogan#GetCurrentWorkingDirPath()
  return fnamemodify(getcwd(), ':p:h:~')
endfunction

function! Haroogan#GetCurrentFilePath()
  return simplify(expand('%:p:.', 1))
endfunction

function! Haroogan#GetTitle()
  return
  \ '<'                                                                        .
  \ '%{Haroogan#GetUserName()}'                                                .
  \ '@'                                                                        .
  \ '%{Haroogan#GetHostName()}'                                                .
  \ '>'                                                                        .
  \ ' '                                                                        .
  \ '"'                                                                        .
  \ '%{Haroogan#GetCurrentWorkingDirPath()}'                                   .
  \ '"'                                                                        .
  \ '%'                                                                        .
  \ '{'                                                                        .
  \   'empty(Haroogan#GetCurrentFilePath())'                                   .
  \   '?'                                                                      .
  \   Haroogan#Quote('')                                                       .
  \   ':'                                                                      .
  \   Haroogan#Quote(' ')                                                      .
  \   '.'                                                                      .
  \   Haroogan#Quote('"')                                                      .
  \   '.'                                                                      .
  \   'Haroogan#GetCurrentFilePath()'                                          .
  \   '.'                                                                      .
  \   Haroogan#Quote('"')                                                      .
  \ '}'
endfunction
" ==============================================================================
" }}} Public
" ==============================================================================
" }}} Functions

" Modeline {{{
" ==============================================================================
" vim:ft=vim:fenc=utf-8:ff=unix:fdm=marker:ts=2:sw=2:tw=80:et:
" ==============================================================================
" }}} Modeline
